
/*  A Bison parser, made from parser.y
    by GNU Bison version 1.28  */

#define YYBISON 1  /* Identify Bison output.  */

#define	IDENTIFIER	257
#define	TYPE_NAME	258
#define	CONSTANT	259
#define	STRING_LITERAL	260
#define	SIZEOF	261
#define	TYPEOF	262
#define	PTR_OP	263
#define	INC_OP	264
#define	DEC_OP	265
#define	LEFT_OP	266
#define	RIGHT_OP	267
#define	LE_OP	268
#define	GE_OP	269
#define	EQ_OP	270
#define	NE_OP	271
#define	AND_OP	272
#define	OR_OP	273
#define	MUL_ASSIGN	274
#define	DIV_ASSIGN	275
#define	MOD_ASSIGN	276
#define	ADD_ASSIGN	277
#define	SUB_ASSIGN	278
#define	LEFT_ASSIGN	279
#define	RIGHT_ASSIGN	280
#define	AND_ASSIGN	281
#define	XOR_ASSIGN	282
#define	OR_ASSIGN	283
#define	TYPEDEF	284
#define	EXTERN	285
#define	STATIC	286
#define	AUTO	287
#define	REGISTER	288
#define	AT	289
#define	SBIT	290
#define	VAR_ARGS	291
#define	CHAR	292
#define	SHORT	293
#define	INT	294
#define	LONG	295
#define	SIGNED	296
#define	UNSIGNED	297
#define	FLOAT	298
#define	DOUBLE	299
#define	CONST	300
#define	VOLATILE	301
#define	VOID	302
#define	BIT	303
#define	STRUCT	304
#define	UNION	305
#define	ENUM	306
#define	CASE	307
#define	DEFAULT	308
#define	IF	309
#define	ELSE	310
#define	SWITCH	311
#define	WHILE	312
#define	DO	313
#define	FOR	314
#define	GOTO	315
#define	CONTINUE	316
#define	BREAK	317
#define	RETURN	318
#define	IFX	319
#define	ADDRESS_OF	320
#define	GET_VALUE_AT_ADDRESS	321
#define	SPIL	322
#define	UNSPIL	323
#define	GETHBIT	324
#define	GETABIT	325
#define	GETBYTE	326
#define	GETWORD	327
#define	BITWISEAND	328
#define	UNARYMINUS	329
#define	IPUSH	330
#define	IPOP	331
#define	PCALL	332
#define	ENDFUNCTION	333
#define	JUMPTABLE	334
#define	RRC	335
#define	RLC	336
#define	CAST	337
#define	CALL	338
#define	PARAM	339
#define	LABEL	340
#define	RECEIVE	341
#define	SEND	342
#define	ARRAYINIT	343
#define	INLINE	344

#line 5 "parser.y"

#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include "common.h"
#include "iCode.h"

STACK_DCL (AndOrStack, int, MAX_DCL_STACK);
STACK_DCL (BreakStack, int, MAX_DCL_STACK);
STACK_DCL (BreakLabelStack, char *, MAX_DCL_STACK); 
STACK_DCL (ContinueStack, int, MAX_DCL_STACK);
STACK_DCL (ContinueLabelStack, char *, MAX_DCL_STACK);
STACK_DCL (SwitchStack,struct stab *, MAX_DCL_STACK);

/* added by nttrung */
STACK_DCL (blockNum, int, MAX_DCL_STACK);

FILE *pFileRule;
extern int yyerror (char *);
extern FILE     *yyin;
int NestLevel = 0 ;     /* current NestLevel       */
int stackPtr  = 0 ;     /* stack pointer           */
int reentrant = 0 ;
int blockNo   = 0 ;     /* sequential block number  */
int currBlockno=0 ;
int inCritical= 0 ;
int seqPointNo= 1 ;     /* sequence point number */
char labelbuffer[MAX_LENGTH_BUFFER];
int ignoreTypedefType=0;
extern int yylex();
extern char *yytext;
int yyparse(void);
char lbuff[1024];      /* local buffer */
int	Case_label = 0;
/* break & continue stacks */
bool uselessDecl = TRUE;

#define YYDEBUG 1


#line 47 "parser.y"
typedef union {
    struct symbol	*sym;      
	struct value	*val;
	struct operand  *op;
	struct sym_link   *lnk ;     
    char	yychar[255];
    int		yyint;     
	const char *yyinline;
    //initList   *ilist;   
	struct structdef  *sdef;
} YYSTYPE;
#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		389
#define	YYFLAG		-32768
#define	YYNTBASE	115

#define YYTRANSLATE(x) ((unsigned)(x) <= 344 ? yytranslate[x] : 218)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,   102,     2,     2,     2,   104,    97,     2,    91,
    92,    98,    99,    96,   100,    95,   103,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,   110,   112,   105,
   111,   106,   109,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    93,     2,    94,   107,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,   113,   108,   114,   101,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     3,     4,     5,     6,
     7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
    17,    18,    19,    20,    21,    22,    23,    24,    25,    26,
    27,    28,    29,    30,    31,    32,    33,    34,    35,    36,
    37,    38,    39,    40,    41,    42,    43,    44,    45,    46,
    47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
    57,    58,    59,    60,    61,    62,    63,    64,    65,    66,
    67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
    77,    78,    79,    80,    81,    82,    83,    84,    85,    86,
    87,    88,    89,    90
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     1,     3,     5,     8,    10,    12,    13,    17,    18,
    23,    25,    28,    30,    32,    34,    38,    40,    42,    47,
    51,    56,    57,    62,    63,    68,    71,    74,    76,    80,
    82,    85,    88,    91,    94,    99,   102,   104,   106,   108,
   110,   112,   114,   116,   121,   123,   127,   131,   135,   137,
   141,   145,   147,   151,   155,   157,   161,   165,   169,   173,
   175,   179,   183,   185,   189,   191,   195,   197,   201,   203,
   204,   209,   211,   213,   214,   219,   221,   223,   224,   225,
   233,   235,   239,   241,   243,   245,   247,   249,   251,   253,
   255,   257,   259,   261,   263,   267,   269,   272,   276,   278,
   280,   283,   285,   288,   290,   293,   295,   299,   301,   305,
   307,   309,   311,   313,   315,   317,   319,   323,   325,   327,
   329,   331,   333,   335,   337,   339,   341,   343,   345,   347,
   349,   350,   357,   360,   362,   364,   366,   367,   369,   371,
   374,   378,   380,   384,   386,   389,   393,   394,   399,   405,
   408,   410,   413,   417,   420,   423,   424,   426,   429,   431,
   433,   435,   438,   440,   442,   446,   450,   455,   456,   461,
   462,   468,   473,   475,   478,   481,   485,   487,   489,   491,
   494,   496,   500,   502,   506,   508,   512,   515,   517,   519,
   522,   524,   526,   529,   533,   536,   540,   544,   549,   552,
   556,   560,   561,   567,   569,   573,   578,   580,   584,   586,
   588,   590,   592,   594,   596,   599,   603,   606,   608,   610,
   613,   617,   621,   626,   629,   631,   634,   636,   639,   641,
   644,   650,   651,   660,   661,   668,   669,   672,   673,   674,
   681,   682,   683,   693,   694,   695,   707,   708,   710,   714,
   717,   720,   723,   727
};

static const short yyrhs[] = {    -1,
   116,     0,   117,     0,   116,   117,     0,   118,     0,   152,
     0,     0,   176,   119,   121,     0,     0,   153,   176,   120,
   121,     0,   200,     0,   201,   200,     0,   217,     0,     5,
     0,   123,     0,    91,   150,    92,     0,     6,     0,   122,
     0,   124,    93,   150,    94,     0,   124,    91,    92,     0,
   124,    91,   127,    92,     0,     0,   124,    95,   125,   217,
     0,     0,   124,     9,   126,   217,     0,   124,    10,     0,
   124,    11,     0,   148,     0,   148,    96,   127,     0,   124,
     0,    10,   128,     0,    11,   128,     0,   129,   130,     0,
     7,   128,     0,     7,    91,   190,    92,     0,     8,   128,
     0,    97,     0,    98,     0,    99,     0,   100,     0,   101,
     0,   102,     0,   128,     0,    91,   190,    92,   130,     0,
   130,     0,   131,    98,   130,     0,   131,   103,   130,     0,
   131,   104,   130,     0,   131,     0,   132,    99,   131,     0,
   132,   100,   131,     0,   132,     0,   133,    12,   132,     0,
   133,    13,   132,     0,   133,     0,   134,   105,   133,     0,
   134,   106,   133,     0,   134,    14,   133,     0,   134,    15,
   133,     0,   134,     0,   135,    16,   134,     0,   135,    17,
   134,     0,   135,     0,   136,    97,   135,     0,   136,     0,
   137,   107,   136,     0,   137,     0,   138,   108,   137,     0,
   138,     0,     0,   139,    18,   140,   138,     0,   139,     0,
   141,     0,     0,   142,    19,   143,   141,     0,   142,     0,
   144,     0,     0,     0,   142,   109,   146,   142,   110,   147,
   145,     0,   145,     0,   130,   149,   148,     0,   111,     0,
    20,     0,    21,     0,    22,     0,    23,     0,    24,     0,
    25,     0,    26,     0,    27,     0,    28,     0,    29,     0,
   148,     0,   150,    96,   148,     0,   145,     0,   153,   112,
     0,   153,   155,   112,     0,   154,     0,   157,     0,   157,
   154,     0,   159,     0,   159,   154,     0,   158,     0,   158,
   154,     0,   156,     0,   155,    96,   156,     0,   174,     0,
   174,   111,   194,     0,    30,     0,    31,     0,    32,     0,
    33,     0,    34,     0,    90,     0,   160,     0,   160,    35,
   151,     0,    38,     0,    39,     0,    40,     0,    41,     0,
    42,     0,    43,     0,    48,     0,    46,     0,    47,     0,
    49,     0,   161,     0,   170,     0,     4,     0,     0,   163,
   164,   162,   113,   166,   114,     0,   163,   165,     0,    50,
     0,    51,     0,   165,     0,     0,   217,     0,   167,     0,
   166,   167,     0,   184,   168,   112,     0,   169,     0,   168,
    96,   169,     0,   174,     0,   110,   151,     0,   174,   110,
   151,     0,     0,    52,   113,   171,   114,     0,    52,   217,
   113,   171,   114,     0,    52,   217,     0,   172,     0,   171,
    96,     0,   171,    96,   172,     0,   217,   173,     0,   111,
   151,     0,     0,   175,     0,   182,   175,     0,   177,     0,
   178,     0,   177,     0,   182,   177,     0,   179,     0,   217,
     0,    91,   174,    92,     0,   175,    93,    94,     0,   175,
    93,   151,    94,     0,     0,   178,    91,   180,    92,     0,
     0,   178,    91,   181,   187,    92,     0,   178,    91,   186,
    92,     0,   183,     0,   183,   184,     0,   183,   182,     0,
   183,   184,   182,     0,    98,     0,   185,     0,   159,     0,
   185,   159,     0,   217,     0,   186,    96,   217,     0,   188,
     0,   188,    96,    37,     0,   189,     0,   188,    96,   189,
     0,   184,   174,     0,   190,     0,   184,     0,   184,   191,
     0,   182,     0,   192,     0,   182,   192,     0,    91,   191,
    92,     0,    93,    94,     0,    93,   151,    94,     0,   192,
    93,    94,     0,   192,    93,   151,    94,     0,    91,    92,
     0,    91,   187,    92,     0,   192,    91,    92,     0,     0,
   192,    91,   193,   187,    92,     0,   148,     0,   113,   195,
   114,     0,   113,   195,    96,   114,     0,   194,     0,   195,
    96,   194,     0,   197,     0,   200,     0,   203,     0,   204,
     0,   209,     0,   216,     0,   217,   110,     0,    53,   151,
   110,     0,    54,   110,     0,   113,     0,   114,     0,   198,
   199,     0,   198,   202,   199,     0,   198,   201,   199,     0,
   198,   201,   202,   199,     0,     1,   112,     0,   152,     0,
   201,   152,     0,   196,     0,   202,   196,     0,   112,     0,
   150,   112,     0,    55,    91,   207,    92,   196,     0,     0,
    55,    91,   207,    92,   196,    56,   205,   196,     0,     0,
    57,    91,   150,    92,   206,   196,     0,     0,   208,   150,
     0,     0,     0,    58,    91,   207,    92,   210,   196,     0,
     0,     0,    59,   211,   196,    58,   212,    91,   207,    92,
   112,     0,     0,     0,    60,    91,   215,   112,   207,   112,
   213,   215,    92,   214,   196,     0,     0,   150,     0,    61,
   217,   112,     0,    62,   112,     0,    63,   112,     0,    64,
   112,     0,    64,   150,   112,     0,     3,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   109,   113,   117,   118,   122,   123,   143,   152,   155,   167,
   173,   174,   183,   212,   216,   217,   224,   231,   232,   239,
   246,   253,   254,   262,   263,   272,   279,   290,   291,   300,
   301,   308,   315,   331,   335,   339,   346,   347,   348,   349,
   350,   351,   355,   356,   366,   367,   374,   381,   391,   392,
   399,   409,   410,   417,   427,   428,   435,   442,   449,   459,
   460,   467,   477,   478,   488,   489,   499,   500,   510,   515,
   521,   529,   543,   548,   554,   562,   575,   576,   586,   601,
   610,   611,   671,   672,   673,   674,   675,   676,   677,   678,
   679,   680,   681,   685,   686,   692,   696,   704,   719,   723,
   724,   737,   738,   751,   752,   766,   767,   775,   779,   790,
   794,   798,   802,   806,   813,   817,   818,   824,   829,   834,
   839,   844,   849,   854,   859,   863,   867,   868,   873,   874,
   886,   901,   931,   965,   966,   970,   971,   978,   991,   992,
  1003,  1029,  1030,  1038,  1039,  1043,  1048,  1052,  1053,  1054,
  1058,  1059,  1060,  1065,  1070,  1071,  1075,  1079,  1088,  1092,
  1100,  1101,  1110,  1114,  1115,  1119,  1128,  1164,  1164,  1165,
  1165,  1189,  1199,  1200,  1211,  1217,  1233,  1241,  1248,  1249,
  1265,  1266,  1274,  1275,  1280,  1281,  1290,  1302,  1312,  1317,
  1334,  1335,  1336,  1341,  1342,  1343,  1344,  1345,  1346,  1347,
  1348,  1349,  1349,  1353,  1354,  1355,  1359,  1360,  1364,  1365,
  1366,  1367,  1368,  1369,  1374,  1375,  1382,  1391,  1399,  1403,
  1404,  1405,  1406,  1407,  1411,  1435,  1472,  1473,  1480,  1481,
  1485,  1490,  1499,  1503,  1512,  1520,  1524,  1532,  1538,  1547,
  1557,  1567,  1572,  1586,  1597,  1605,  1618,  1619,  1623,  1627,
  1639,  1651,  1655,  1663
};
#endif


#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)

static const char * const yytname[] = {   "$","error","$undefined.","IDENTIFIER",
"TYPE_NAME","CONSTANT","STRING_LITERAL","SIZEOF","TYPEOF","PTR_OP","INC_OP",
"DEC_OP","LEFT_OP","RIGHT_OP","LE_OP","GE_OP","EQ_OP","NE_OP","AND_OP","OR_OP",
"MUL_ASSIGN","DIV_ASSIGN","MOD_ASSIGN","ADD_ASSIGN","SUB_ASSIGN","LEFT_ASSIGN",
"RIGHT_ASSIGN","AND_ASSIGN","XOR_ASSIGN","OR_ASSIGN","TYPEDEF","EXTERN","STATIC",
"AUTO","REGISTER","AT","SBIT","VAR_ARGS","CHAR","SHORT","INT","LONG","SIGNED",
"UNSIGNED","FLOAT","DOUBLE","CONST","VOLATILE","VOID","BIT","STRUCT","UNION",
"ENUM","CASE","DEFAULT","IF","ELSE","SWITCH","WHILE","DO","FOR","GOTO","CONTINUE",
"BREAK","RETURN","IFX","ADDRESS_OF","GET_VALUE_AT_ADDRESS","SPIL","UNSPIL","GETHBIT",
"GETABIT","GETBYTE","GETWORD","BITWISEAND","UNARYMINUS","IPUSH","IPOP","PCALL",
"ENDFUNCTION","JUMPTABLE","RRC","RLC","CAST","CALL","PARAM","LABEL","RECEIVE",
"SEND","ARRAYINIT","INLINE","'('","')'","'['","']'","'.'","','","'&'","'*'",
"'+'","'-'","'~'","'!'","'/'","'%'","'<'","'>'","'^'","'|'","'?'","':'","'='",
"';'","'{'","'}'","file","program","external_definition","function_definition",
"@1","@2","function_body","primary_expr","string_literal","postfix_expr","@3",
"@4","argument_expr_list","unary_expr","unary_operator","cast_expr","multiplicative_expr",
"additive_expr","shift_expr","relational_expr","equality_expr","and_expr","exclusive_or_expr",
"inclusive_or_expr","logical_and_expr","@5","logical_and_expr__","logical_or_expr",
"@6","logical_or_expr__","conditional_expr","@7","@8","assignment_expr","assignment_operator",
"expr","constant_expr","declaration","declaration_specifiers","declaration_specifiers_",
"init_declarator_list","init_declarator","storage_class_specifier","function_specifier",
"type_specifier","type_specifier2","struct_or_union_specifier","@9","struct_or_union",
"opt_stag","stag","struct_declaration_list","struct_declaration","struct_declarator_list",
"struct_declarator","enum_specifier","enumerator_list","enumerator","opt_assign_expr",
"declarator","declarator3","function_declarator","declarator2_function_attributes",
"declarator2","function_declarator2","@10","@11","pointer","unqualified_pointer",
"type_specifier_list","type_specifier_list_","identifier_list","parameter_type_list",
"parameter_list","parameter_declaration","type_name","abstract_declarator","abstract_declarator2",
"@12","initializer","initializer_list","statement","labeled_statement","start_block",
"end_block","compound_statement","declaration_list","statement_list","expression_statement",
"selection_statement","@13","@14","test","@15","iteration_statement","@16","@17",
"@18","@19","@20","expr_opt","jump_statement","identifier", NULL
};
#endif

static const short yyr1[] = {     0,
   115,   115,   116,   116,   117,   117,   119,   118,   120,   118,
   121,   121,   122,   122,   122,   122,   123,   124,   124,   124,
   124,   125,   124,   126,   124,   124,   124,   127,   127,   128,
   128,   128,   128,   128,   128,   128,   129,   129,   129,   129,
   129,   129,   130,   130,   131,   131,   131,   131,   132,   132,
   132,   133,   133,   133,   134,   134,   134,   134,   134,   135,
   135,   135,   136,   136,   137,   137,   138,   138,   139,   140,
   139,   141,   142,   143,   142,   144,   145,   146,   147,   145,
   148,   148,   149,   149,   149,   149,   149,   149,   149,   149,
   149,   149,   149,   150,   150,   151,   152,   152,   153,   154,
   154,   154,   154,   154,   154,   155,   155,   156,   156,   157,
   157,   157,   157,   157,   158,   159,   159,   160,   160,   160,
   160,   160,   160,   160,   160,   160,   160,   160,   160,   160,
   162,   161,   161,   163,   163,   164,   164,   165,   166,   166,
   167,   168,   168,   169,   169,   169,   169,   170,   170,   170,
   171,   171,   171,   172,   173,   173,   174,   174,   175,   175,
   176,   176,   177,   178,   178,   178,   178,   180,   179,   181,
   179,   179,   182,   182,   182,   182,   183,   184,   185,   185,
   186,   186,   187,   187,   188,   188,   189,   189,   190,   190,
   191,   191,   191,   192,   192,   192,   192,   192,   192,   192,
   192,   193,   192,   194,   194,   194,   195,   195,   196,   196,
   196,   196,   196,   196,   197,   197,   197,   198,   199,   200,
   200,   200,   200,   200,   201,   201,   202,   202,   203,   203,
   204,   205,   204,   206,   204,   208,   207,   207,   210,   209,
   211,   212,   209,   213,   214,   209,   215,   215,   216,   216,
   216,   216,   216,   217
};

static const short yyr2[] = {     0,
     0,     1,     1,     2,     1,     1,     0,     3,     0,     4,
     1,     2,     1,     1,     1,     3,     1,     1,     4,     3,
     4,     0,     4,     0,     4,     2,     2,     1,     3,     1,
     2,     2,     2,     2,     4,     2,     1,     1,     1,     1,
     1,     1,     1,     4,     1,     3,     3,     3,     1,     3,
     3,     1,     3,     3,     1,     3,     3,     3,     3,     1,
     3,     3,     1,     3,     1,     3,     1,     3,     1,     0,
     4,     1,     1,     0,     4,     1,     1,     0,     0,     7,
     1,     3,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     3,     1,     2,     3,     1,     1,
     2,     1,     2,     1,     2,     1,     3,     1,     3,     1,
     1,     1,     1,     1,     1,     1,     3,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     0,     6,     2,     1,     1,     1,     0,     1,     1,     2,
     3,     1,     3,     1,     2,     3,     0,     4,     5,     2,
     1,     2,     3,     2,     2,     0,     1,     2,     1,     1,
     1,     2,     1,     1,     3,     3,     4,     0,     4,     0,
     5,     4,     1,     2,     2,     3,     1,     1,     1,     2,
     1,     3,     1,     3,     1,     3,     2,     1,     1,     2,
     1,     1,     2,     3,     2,     3,     3,     4,     2,     3,
     3,     0,     5,     1,     3,     4,     1,     3,     1,     1,
     1,     1,     1,     1,     2,     3,     2,     1,     1,     2,
     3,     3,     4,     2,     1,     2,     1,     2,     1,     2,
     5,     0,     8,     0,     6,     0,     2,     0,     0,     6,
     0,     0,     9,     0,     0,    11,     0,     1,     3,     2,
     2,     2,     3,     1
};

static const short yydefact[] = {     1,
   254,   130,   110,   111,   112,   113,   114,   118,   119,   120,
   121,   122,   123,   125,   126,   124,   127,   134,   135,     0,
   115,     0,   177,     2,     3,     5,     6,     0,    99,   100,
   104,   102,   116,   128,   137,   129,     0,     7,   161,   160,
   163,     0,   173,   164,     0,   150,     0,   157,   159,     0,
     4,    97,     0,   106,   108,     9,     0,   101,   105,   103,
     0,   131,   133,   138,     0,     0,   170,   162,   179,   175,
   174,   178,     0,   151,   156,     0,   165,   158,     0,    98,
     0,     0,    14,    17,     0,     0,     0,     0,     0,    37,
    38,    39,    40,    41,    42,    18,    15,    30,    43,     0,
    45,    49,    52,    55,    60,    63,    65,    67,    69,    72,
    73,    76,    77,    96,   117,    13,     0,   166,     0,     0,
   218,     8,   225,     0,     0,    11,     0,     0,     0,     0,
   181,   176,   180,   152,   148,     0,   154,     0,   107,     0,
    45,    81,   204,   109,    10,     0,    34,     0,    36,    31,
    32,    94,     0,   189,     0,    24,    26,    27,     0,     0,
    22,    33,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,    70,    74,
    78,     0,   167,   224,     0,     0,     0,     0,     0,   241,
     0,     0,     0,     0,     0,   229,   219,     0,   227,   209,
   220,   210,     0,     0,   211,   212,   213,   214,    13,   226,
    12,   169,   189,     0,   183,   185,   188,   172,     0,   153,
   155,   149,   207,     0,    84,    85,    86,    87,    88,    89,
    90,    91,    92,    93,    83,     0,     0,    16,     0,     0,
     0,   191,   190,   192,     0,     0,    20,     0,    28,     0,
     0,    46,    47,    48,    50,    51,    53,    54,    58,    59,
    56,    57,    61,    62,    64,    66,    68,     0,     0,     0,
     0,   139,   147,     0,   217,   236,     0,   236,     0,   247,
     0,   250,   251,   252,     0,   230,   222,     0,   228,   221,
   215,     0,   187,   191,   171,     0,   182,     0,   205,    82,
    35,    95,   199,     0,     0,   195,     0,   193,   202,     0,
    44,    25,    21,     0,    19,    23,    71,    75,     0,   132,
   140,     0,     0,   142,   144,   216,     0,     0,     0,     0,
     0,   248,     0,   249,   253,   223,   184,   186,   206,   208,
   200,   194,   196,   201,     0,   197,     0,    29,    79,   145,
   147,   141,     0,     0,   237,   234,   239,   242,   236,     0,
   198,     0,   143,   146,   231,     0,     0,     0,     0,   203,
    80,   232,   235,   240,   236,   244,     0,     0,   247,   233,
     0,     0,   243,   245,     0,   246,     0,     0,     0
};

static const short yydefgoto[] = {   387,
    24,    25,    26,    66,    82,   122,    96,    97,    98,   251,
   246,   248,    99,   100,   141,   102,   103,   104,   105,   106,
   107,   108,   109,   110,   268,   111,   112,   269,   113,   142,
   270,   362,   152,   236,   198,   115,   123,   124,    29,    53,
    54,    30,    31,    32,    33,    34,   117,    35,    62,    63,
   271,   272,   323,   324,    36,    73,    74,   137,    55,    48,
    38,    49,    40,    41,   128,   129,    50,    43,   213,    72,
   130,   304,   215,   216,   217,   243,   244,   345,   144,   224,
   199,   200,   125,   201,   202,   127,   204,   205,   206,   377,
   366,   327,   328,   207,   367,   279,   368,   379,   385,   333,
   208,   116
};

static const short yypact[] = {   887,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,     6,
-32768,    18,-32768,   887,-32768,-32768,-32768,    16,-32768,   819,
   819,   819,    31,-32768,    41,-32768,   -52,-32768,   -13,   -32,
-32768,    45,   578,-32768,    41,    34,     1,   -52,-32768,    45,
-32768,-32768,    74,-32768,    27,-32768,    45,-32768,-32768,-32768,
   782,-32768,    60,-32768,   640,   490,    28,   -13,-32768,-32768,
    80,   995,   -50,-32768,    94,    41,-32768,   -52,    18,-32768,
   564,   490,-32768,-32768,   796,   814,   814,   814,   664,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,    86,-32768,   782,
-32768,   -66,    91,   205,    38,   206,    98,    95,   104,   203,
-32768,    -6,-32768,-32768,-32768,-32768,   114,-32768,   136,   120,
-32768,-32768,-32768,    16,   368,-32768,   490,   142,   995,   -11,
-32768,-32768,-32768,    41,-32768,   782,-32768,    -8,-32768,   564,
   313,-32768,-32768,-32768,-32768,   664,-32768,   782,-32768,-32768,
-32768,-32768,    54,    44,   152,-32768,-32768,-32768,   682,   782,
-32768,-32768,   782,   782,   782,   782,   782,   782,   782,   782,
   782,   782,   782,   782,   782,   782,   782,   782,-32768,-32768,
-32768,   995,-32768,-32768,   782,   147,   170,   171,   172,-32768,
   174,    41,   154,   155,   582,-32768,-32768,    84,-32768,-32768,
-32768,-32768,   368,   386,-32768,-32768,-32768,-32768,   159,-32768,
-32768,-32768,    24,   178,   175,-32768,-32768,-32768,    41,-32768,
-32768,-32768,-32768,    37,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,   782,   183,-32768,   782,   918,
   714,     9,-32768,    48,   782,    41,-32768,   185,   180,   115,
    41,-32768,-32768,-32768,   -66,   -66,    91,    91,   205,   205,
   205,   205,    38,    38,   206,    98,    95,   782,   782,   782,
   276,-32768,    20,   164,-32768,   186,   782,   186,   500,   782,
   169,-32768,-32768,-32768,    88,-32768,-32768,   386,-32768,-32768,
-32768,   903,-32768,    30,-32768,   980,-32768,   540,-32768,-32768,
-32768,-32768,-32768,   190,   191,-32768,   192,    48,   193,   740,
-32768,-32768,-32768,   782,-32768,-32768,   104,-32768,    -2,-32768,
-32768,   782,    89,-32768,   177,-32768,   197,   782,    56,   198,
   226,   195,   181,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,   995,-32768,   204,-32768,-32768,-32768,
    20,-32768,   782,   500,   195,-32768,-32768,-32768,   189,   210,
-32768,   782,-32768,-32768,   241,   500,   500,   214,   196,-32768,
-32768,-32768,-32768,-32768,   186,-32768,   500,   217,   782,-32768,
   199,   218,-32768,-32768,   500,-32768,   320,   321,-32768
};

static const short yypgoto[] = {-32768,
-32768,   289,-32768,-32768,-32768,   247,-32768,-32768,-32768,-32768,
-32768,    32,   -14,-32768,   -10,    59,    68,    70,    73,   156,
   153,   166,    77,-32768,-32768,    78,    79,-32768,-32768,   -58,
-32768,-32768,   -65,-32768,   -83,   -54,     5,    25,   184,-32768,
   269,-32768,-32768,   -42,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,    82,-32768,    -1,-32768,   279,   222,-32768,   -20,    12,
   329,   182,-32768,-32768,-32768,-32768,    15,-32768,   -33,-32768,
-32768,  -125,-32768,    62,   -55,  -222,  -202,-32768,  -126,-32768,
  -178,-32768,-32768,  -143,     2,   234,   157,-32768,-32768,-32768,
-32768,  -270,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -18,
-32768,     0
};


#define	YYLAST		1047


static const short yytable[] = {    44,
    69,    47,   114,   214,    27,   153,   114,   330,     1,    71,
   119,    37,   180,   223,    42,   143,   180,   305,     1,    46,
     1,    44,     1,    44,    28,   289,     1,    44,    27,   133,
     1,   163,     1,   155,    64,    37,   164,   165,    42,   308,
    65,    44,    57,     1,    75,   134,    69,     1,    28,    44,
   101,   170,   171,    37,   101,   154,    44,    70,    67,   287,
   290,    78,   153,   135,   153,    61,   131,   126,    78,   305,
   147,   149,   150,   151,   143,    75,   250,   114,    44,  -159,
   218,   221,  -159,   126,   219,   132,    69,   134,   369,   162,
   237,   308,    77,   249,   156,   157,   158,  -159,  -159,   240,
   331,   241,   181,    69,   378,   222,    22,   349,    22,   289,
    22,   285,   154,    23,   292,    23,   241,    23,    45,  -168,
   292,    23,   241,    44,   209,   101,   114,    52,   211,   322,
   274,   210,   298,    75,   240,    22,   241,    81,   309,    69,
   310,    23,   172,   173,   336,   238,    76,   356,   273,   239,
   299,   239,   252,   253,   254,   101,   101,   101,   101,   101,
   101,   101,   101,   101,   101,   101,   101,   101,   242,    79,
   300,   340,  -136,   302,   101,   365,   159,    23,   160,   239,
   161,    39,   114,   239,   351,    80,   307,   373,   374,   166,
   167,   281,   293,   329,   176,   286,   332,    69,   380,   335,
   352,   177,   209,   209,   136,    39,   386,   210,   315,    39,
   239,   178,    44,    58,    59,    60,   168,   169,   297,   360,
   179,   174,   175,    68,   255,   256,   182,   294,    69,   183,
   101,   184,   143,   212,   311,   257,   258,   273,    68,   259,
   260,   261,   262,   245,   355,   312,   263,   264,   249,    69,
   316,   114,   325,    69,   242,   347,   275,   101,   101,   101,
   276,   277,   278,   114,   280,   282,   283,   350,   291,   295,
   296,    47,    44,   326,   301,   314,   313,  -238,   209,     2,
   334,   341,   342,   358,   344,   343,   353,   209,   354,   357,
   239,    44,   359,    44,   114,   332,   372,   361,   364,   101,
  -238,   370,    69,   371,   375,    78,   294,   376,   381,   384,
   383,   101,    51,     8,     9,    10,    11,    12,    13,   388,
   389,    14,    15,    16,    17,    18,    19,    20,   145,   266,
   325,   265,   225,   226,   227,   228,   229,   230,   231,   232,
   233,   234,   101,   267,   317,   348,   318,   139,   319,   363,
    44,   101,   321,   209,   138,   220,    56,   338,   203,   288,
   382,     0,     0,     0,     0,   209,   209,     0,   120,     0,
     1,     2,    83,    84,    85,    86,   209,    87,    88,     0,
     0,     0,     0,     0,   209,     0,   120,     0,     1,   320,
    83,    84,    85,    86,     0,    87,    88,     3,     4,     5,
     6,     7,     0,     0,     0,     8,     9,    10,    11,    12,
    13,     0,     0,    14,    15,    16,    17,    18,    19,    20,
   185,   186,   187,   235,   188,   189,   190,   191,   192,   193,
   194,   195,     0,     0,     0,     0,     0,     0,   185,   186,
   187,     0,   188,   189,   190,   191,   192,   193,   194,   195,
     0,     0,     0,     0,     0,     0,     0,    21,    89,     0,
     0,     0,     0,     0,    90,    91,    92,    93,    94,    95,
     0,     0,     0,     0,     0,     0,    89,     0,     0,   196,
   121,   197,    90,    91,    92,    93,    94,    95,     0,     0,
   120,     0,     0,     2,     0,     0,     0,   196,   121,   197,
   120,     0,     1,     0,    83,    84,    85,    86,     0,    87,
    88,     0,     0,     0,     0,     0,     0,     0,     0,     3,
     4,     5,     6,     7,     0,     0,     0,     8,     9,    10,
    11,    12,    13,     0,     0,    14,    15,    16,    17,    18,
    19,    20,     1,     0,    83,    84,    85,    86,     0,    87,
    88,     0,   185,   186,   187,     0,   188,   189,   190,   191,
   192,   193,   194,   195,     0,     0,     1,     0,    83,    84,
    85,    86,     0,    87,    88,     0,     0,     0,     0,    21,
     0,     2,     0,     0,     1,     0,    83,    84,    85,    86,
    89,    87,    88,     0,     0,     0,    90,    91,    92,    93,
    94,    95,   121,     0,     0,     0,     0,     0,     0,     0,
     0,   196,   121,     0,     0,     8,     9,    10,    11,    12,
    13,     0,     0,    14,    15,    16,    17,    18,    19,    20,
    89,     0,     0,     0,     0,     0,    90,    91,    92,    93,
    94,    95,     1,     0,    83,    84,    85,    86,     0,    87,
    88,     0,   140,   339,    89,     0,     0,     0,     0,     0,
    90,    91,    92,    93,    94,    95,     1,     2,    83,    84,
    85,    86,    89,    87,    88,    23,   140,     0,    90,    91,
    92,    93,    94,    95,     1,     0,    83,    84,    85,    86,
     0,    87,    88,   284,     0,     0,     0,     0,     0,     0,
     0,     8,     9,    10,    11,    12,    13,     0,     0,    14,
    15,    16,    17,    18,    19,    20,     1,     0,    83,    84,
    85,    86,     0,    87,    88,     0,     0,     0,     0,     0,
    89,     0,     0,   118,     0,     0,    90,    91,    92,    93,
    94,    95,     1,     0,    83,    84,    85,    86,     0,    87,
    88,     0,     0,     0,    89,     0,     0,     0,     0,     0,
    90,    91,    92,    93,    94,    95,     0,     0,     0,     0,
     0,     0,    89,   247,     0,     0,     0,     0,    90,    91,
    92,    93,    94,    95,     1,     0,    83,    84,    85,    86,
     0,    87,    88,     0,     0,     0,     0,     0,     1,     0,
    83,    84,    85,    86,    89,    87,    88,   306,     0,     0,
    90,    91,    92,    93,    94,    95,     1,     0,    83,    84,
    85,    86,     2,    87,    88,     0,     0,     0,     0,     0,
    89,     0,     0,   346,     0,     0,    90,    91,    92,    93,
    94,    95,     0,     0,     0,     0,     0,     0,     3,     4,
     5,     6,     7,     0,     0,     0,     8,     9,    10,    11,
    12,    13,     0,     0,    14,    15,    16,    17,    18,    19,
    20,     0,    89,     0,     0,     0,     0,     0,    90,    91,
    92,    93,    94,    95,     0,     0,   146,     0,     0,     1,
     2,     0,    90,    91,    92,    93,    94,    95,     0,     0,
     0,     0,     0,     0,   148,     1,     2,     0,    21,     0,
    90,    91,    92,    93,    94,    95,     3,     4,     5,     6,
     7,     2,     0,     0,     8,     9,    10,    11,    12,    13,
     0,     0,    14,    15,    16,    17,    18,    19,    20,     0,
     8,     9,    10,    11,    12,    13,     0,     0,    14,    15,
    16,    17,    18,    19,    20,     8,     9,    10,    11,    12,
    13,     0,     0,    14,    15,    16,    17,    18,    19,    20,
     0,     0,     0,     0,     0,     0,    21,    22,     0,     0,
     0,     0,     0,     2,    23,     0,     0,     0,     0,     0,
     0,     0,     0,   292,   303,   241,     0,     0,     2,     0,
    23,     0,     0,     0,     0,     0,     0,     0,   240,   303,
   241,     0,     0,     0,     0,    23,   337,     8,     9,    10,
    11,    12,    13,     0,     0,    14,    15,    16,    17,    18,
    19,    20,     8,     9,    10,    11,    12,    13,     0,     0,
    14,    15,    16,    17,    18,    19,    20
};

static const short yycheck[] = {     0,
    43,    22,    61,   129,     0,    89,    65,   278,     3,    43,
    65,     0,    19,   140,     0,    81,    19,   240,     3,    20,
     3,    22,     3,    24,     0,   204,     3,    28,    24,    72,
     3,    98,     3,    89,    35,    24,   103,   104,    24,   242,
    93,    42,    28,     3,    45,    96,    89,     3,    24,    50,
    61,    14,    15,    42,    65,    89,    57,    43,    91,   203,
   204,    50,   146,   114,   148,    35,    67,    66,    57,   292,
    85,    86,    87,    88,   140,    76,   160,   136,    79,    93,
    92,   136,    96,    82,    96,    71,   129,    96,   359,   100,
   146,   294,    92,   159,     9,    10,    11,   111,   112,    91,
   279,    93,   109,   146,   375,   114,    91,   110,    91,   288,
    91,   195,   146,    98,    91,    98,    93,    98,   113,    92,
    91,    98,    93,   124,   125,   136,   185,   112,   127,   110,
   185,   127,    96,   134,    91,    91,    93,   111,    91,   182,
    93,    98,   105,   106,   288,    92,   113,    92,   182,    96,
   114,    96,   163,   164,   165,   166,   167,   168,   169,   170,
   171,   172,   173,   174,   175,   176,   177,   178,   154,    96,
   236,   298,   113,   239,   185,   354,    91,    98,    93,    96,
    95,     0,   241,    96,    96,   112,   241,   366,   367,    99,
   100,   192,   213,   277,    97,   112,   280,   240,   377,   112,
   112,   107,   203,   204,   111,    24,   385,   203,    94,    28,
    96,   108,   213,    30,    31,    32,    12,    13,   219,   345,
    18,    16,    17,    42,   166,   167,   113,   213,   271,    94,
   241,   112,   298,    92,   245,   168,   169,   271,    57,   170,
   171,   172,   173,    92,   328,   246,   174,   175,   314,   292,
   251,   310,   273,   296,   240,   310,   110,   268,   269,   270,
    91,    91,    91,   322,    91,   112,   112,   322,   110,    92,
    96,   292,   273,   110,    92,    96,    92,    92,   279,     4,
   112,    92,    92,    58,    92,    94,   110,   288,    92,    92,
    96,   292,   112,   294,   353,   379,    56,    94,   353,   310,
   112,    92,   345,   362,    91,   294,   292,   112,    92,    92,
   112,   322,    24,    38,    39,    40,    41,    42,    43,     0,
     0,    46,    47,    48,    49,    50,    51,    52,    82,   177,
   351,   176,    20,    21,    22,    23,    24,    25,    26,    27,
    28,    29,   353,   178,   268,   314,   269,    79,   270,   351,
   351,   362,   271,   354,    76,   134,    28,   296,   125,   203,
   379,    -1,    -1,    -1,    -1,   366,   367,    -1,     1,    -1,
     3,     4,     5,     6,     7,     8,   377,    10,    11,    -1,
    -1,    -1,    -1,    -1,   385,    -1,     1,    -1,     3,   114,
     5,     6,     7,     8,    -1,    10,    11,    30,    31,    32,
    33,    34,    -1,    -1,    -1,    38,    39,    40,    41,    42,
    43,    -1,    -1,    46,    47,    48,    49,    50,    51,    52,
    53,    54,    55,   111,    57,    58,    59,    60,    61,    62,
    63,    64,    -1,    -1,    -1,    -1,    -1,    -1,    53,    54,
    55,    -1,    57,    58,    59,    60,    61,    62,    63,    64,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    90,    91,    -1,
    -1,    -1,    -1,    -1,    97,    98,    99,   100,   101,   102,
    -1,    -1,    -1,    -1,    -1,    -1,    91,    -1,    -1,   112,
   113,   114,    97,    98,    99,   100,   101,   102,    -1,    -1,
     1,    -1,    -1,     4,    -1,    -1,    -1,   112,   113,   114,
     1,    -1,     3,    -1,     5,     6,     7,     8,    -1,    10,
    11,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    30,
    31,    32,    33,    34,    -1,    -1,    -1,    38,    39,    40,
    41,    42,    43,    -1,    -1,    46,    47,    48,    49,    50,
    51,    52,     3,    -1,     5,     6,     7,     8,    -1,    10,
    11,    -1,    53,    54,    55,    -1,    57,    58,    59,    60,
    61,    62,    63,    64,    -1,    -1,     3,    -1,     5,     6,
     7,     8,    -1,    10,    11,    -1,    -1,    -1,    -1,    90,
    -1,     4,    -1,    -1,     3,    -1,     5,     6,     7,     8,
    91,    10,    11,    -1,    -1,    -1,    97,    98,    99,   100,
   101,   102,   113,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,   112,   113,    -1,    -1,    38,    39,    40,    41,    42,
    43,    -1,    -1,    46,    47,    48,    49,    50,    51,    52,
    91,    -1,    -1,    -1,    -1,    -1,    97,    98,    99,   100,
   101,   102,     3,    -1,     5,     6,     7,     8,    -1,    10,
    11,    -1,   113,   114,    91,    -1,    -1,    -1,    -1,    -1,
    97,    98,    99,   100,   101,   102,     3,     4,     5,     6,
     7,     8,    91,    10,    11,    98,   113,    -1,    97,    98,
    99,   100,   101,   102,     3,    -1,     5,     6,     7,     8,
    -1,    10,    11,   112,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    38,    39,    40,    41,    42,    43,    -1,    -1,    46,
    47,    48,    49,    50,    51,    52,     3,    -1,     5,     6,
     7,     8,    -1,    10,    11,    -1,    -1,    -1,    -1,    -1,
    91,    -1,    -1,    94,    -1,    -1,    97,    98,    99,   100,
   101,   102,     3,    -1,     5,     6,     7,     8,    -1,    10,
    11,    -1,    -1,    -1,    91,    -1,    -1,    -1,    -1,    -1,
    97,    98,    99,   100,   101,   102,    -1,    -1,    -1,    -1,
    -1,    -1,    91,    92,    -1,    -1,    -1,    -1,    97,    98,
    99,   100,   101,   102,     3,    -1,     5,     6,     7,     8,
    -1,    10,    11,    -1,    -1,    -1,    -1,    -1,     3,    -1,
     5,     6,     7,     8,    91,    10,    11,    94,    -1,    -1,
    97,    98,    99,   100,   101,   102,     3,    -1,     5,     6,
     7,     8,     4,    10,    11,    -1,    -1,    -1,    -1,    -1,
    91,    -1,    -1,    94,    -1,    -1,    97,    98,    99,   100,
   101,   102,    -1,    -1,    -1,    -1,    -1,    -1,    30,    31,
    32,    33,    34,    -1,    -1,    -1,    38,    39,    40,    41,
    42,    43,    -1,    -1,    46,    47,    48,    49,    50,    51,
    52,    -1,    91,    -1,    -1,    -1,    -1,    -1,    97,    98,
    99,   100,   101,   102,    -1,    -1,    91,    -1,    -1,     3,
     4,    -1,    97,    98,    99,   100,   101,   102,    -1,    -1,
    -1,    -1,    -1,    -1,    91,     3,     4,    -1,    90,    -1,
    97,    98,    99,   100,   101,   102,    30,    31,    32,    33,
    34,     4,    -1,    -1,    38,    39,    40,    41,    42,    43,
    -1,    -1,    46,    47,    48,    49,    50,    51,    52,    -1,
    38,    39,    40,    41,    42,    43,    -1,    -1,    46,    47,
    48,    49,    50,    51,    52,    38,    39,    40,    41,    42,
    43,    -1,    -1,    46,    47,    48,    49,    50,    51,    52,
    -1,    -1,    -1,    -1,    -1,    -1,    90,    91,    -1,    -1,
    -1,    -1,    -1,     4,    98,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    91,    92,    93,    -1,    -1,     4,    -1,
    98,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    91,    92,
    93,    -1,    -1,    -1,    -1,    98,    37,    38,    39,    40,
    41,    42,    43,    -1,    -1,    46,    47,    48,    49,    50,
    51,    52,    38,    39,    40,    41,    42,    43,    -1,    -1,
    46,    47,    48,    49,    50,    51,    52
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/local/share/bison.simple"
/* This file comes from bison-1.28.  */

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

#ifndef YYSTACK_USE_ALLOCA
#ifdef alloca
#define YYSTACK_USE_ALLOCA
#else /* alloca not defined */
#ifdef __GNUC__
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
#define YYSTACK_USE_ALLOCA
#include <alloca.h>
#else /* not sparc */
/* We think this test detects Watcom and Microsoft C.  */
/* This used to test MSDOS, but that is a bad idea
   since that symbol is in the user namespace.  */
#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
#if 0 /* No need for malloc.h, which pollutes the namespace;
	 instead, just don't use alloca.  */
#include <malloc.h>
#endif
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
/* I don't know what this was needed for, but it pollutes the namespace.
   So I turned it off.   rms, 2 May 1997.  */
/* #include <malloc.h>  */
 #pragma alloca
#define YYSTACK_USE_ALLOCA
#else /* not MSDOS, or __TURBOC__, or _AIX */
#if 0
#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
		 and on HPUX 10.  Eventually we can turn this on.  */
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#endif /* __hpux */
#endif
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc */
#endif /* not GNU C */
#endif /* alloca not defined */
#endif /* YYSTACK_USE_ALLOCA not defined */

#ifdef YYSTACK_USE_ALLOCA
#define YYSTACK_ALLOC alloca
#else
#define YYSTACK_ALLOC malloc
#endif

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	goto yyacceptlab
#define YYABORT 	goto yyabortlab
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Define __yy_memcpy.  Note that the size argument
   should be passed with type unsigned int, because that is what the non-GCC
   definitions require.  With GCC, __builtin_memcpy takes an arg
   of type size_t, but it can handle unsigned int.  */

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (to, from, count)
     char *to;
     char *from;
     unsigned int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (char *to, char *from, unsigned int count)
{
  register char *t = to;
  register char *f = from;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 217 "/usr/local/share/bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
#ifdef YYPARSE_PARAM
int yyparse (void *);
#else
int yyparse (void);
#endif
#endif

int
yyparse(YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;
  int yyfree_stacks = 0;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  if (yyfree_stacks)
	    {
	      free (yyss);
	      free (yyvs);
#ifdef YYLSP_NEEDED
	      free (yyls);
#endif
	    }
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
#ifndef YYSTACK_USE_ALLOCA
      yyfree_stacks = 1;
#endif
      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
      __yy_memcpy ((char *)yyss, (char *)yyss1,
		   size * (unsigned int) sizeof (*yyssp));
      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
		   size * (unsigned int) sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls, (char *)yyls1,
		   size * (unsigned int) sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 1:
#line 110 "parser.y"
{ 
			yylexerror("Empty source code");
        ;
    break;}
case 2:
#line 113 "parser.y"
{ 	reverseiCChain(); ;
    break;}
case 5:
#line 122 "parser.y"
{  blockNo = 0; ;
    break;}
case 6:
#line 124 "parser.y"
{							   
							   ignoreTypedefType = 0;
                               if (yyvsp[0].sym && yyvsp[0].sym->type
                                && IS_FUNC(yyvsp[0].sym->type))
                               {
                                   if (yyvsp[0].sym->etype
                                    && IS_SPEC(yyvsp[0].sym->etype)
                                    && !SPEC_STAT(yyvsp[0].sym->etype))
                                   {
                                        SPEC_EXTR(yyvsp[0].sym->etype) = 1;
                                   }
                               }
                               
                               addSymChain (&yyvsp[0].sym); 
							   allocVariables(yyvsp[0].sym);                                                             							  
						   ;
    break;}
case 7:
#line 144 "parser.y"
{ 
		symbol *sym;
		addDecl(yyvsp[0].sym,0, newIntLink());	
  		sym = createFunction(yyvsp[0].sym);

		geniCodeFunction(operandFromSymbol(sym));
	;
    break;}
case 8:
#line 152 "parser.y"
{
		geniCodeEndFunction();
	;
    break;}
case 9:
#line 156 "parser.y"
{
		symbol *sym;
        pointerTypes(yyvsp[0].sym->type,copyLinkChain(yyvsp[-1].lnk));
        addDecl(yyvsp[0].sym,0,yyvsp[-1].lnk);	
        
  		/* add symbol to table */
  		sym = createFunction(yyvsp[0].sym);    
		
		geniCodeFunction(operandFromSymbol(sym));
	;
    break;}
case 10:
#line 167 "parser.y"
{ 
		geniCodeEndFunction();
	;
    break;}
case 12:
#line 175 "parser.y"
{
            yylexerror("Old style: %s", (yyvsp[-1].sym ? yyvsp[-1].sym->name : ""));
            exit(1);		
		;
    break;}
case 13:
#line 184 "parser.y"
{ 			
			symbol *sym, *sym1;
			char *sen = yyvsp[0].sym->name;
			sym = findSym(TypedefTab, yyvsp[0].sym, yyvsp[0].sym->name);			
			if (sym)
				yylexerror("duplicate identifier name '%s' and typedef type '%s'", yyvsp[0].sym->name, ((symbol *)sym)->name);								
			else
				sym = findSymWithLevel(SymbolTab, yyvsp[0].sym);
				
			if (sym &&
			    (sym->islocal || sym->_isparm) &&
			    strcmp(sym->localof->name, currFunc->name) != 0)
			{
				sym1 = yyvsp[0].sym;
				sym1->level = 0;				
				sym = findSymWithLevel(SymbolTab, sym1);
			}
							
			if (!sym)
			{
				yylexerror("undefined identifier '%s'", yyvsp[0].sym->name);
				yyval.op = NULL;
			}
			else
			{
				yyval.op = operandFromSymbol(sym);
			}
		;
    break;}
case 14:
#line 213 "parser.y"
{
			yyval.op = operandFromValue(yyvsp[0].val);
		;
    break;}
case 16:
#line 218 "parser.y"
{
			yyval.op = yyvsp[-1].op; 			
		;
    break;}
case 17:
#line 225 "parser.y"
{
		yyval.op = operandFromValue(yyvsp[0].val);
    ;
    break;}
case 19:
#line 233 "parser.y"
{
			if (yyvsp[-3].op && yyvsp[-1].op)
				yyval.op = geniCodeArray(yyvsp[-3].op, yyvsp[-1].op);
			else
				yyval.op = NULL;
		;
    break;}
case 20:
#line 240 "parser.y"
{
			if (yyvsp[-2].op)
				yyval.op = geniCodeCall(yyvsp[-2].op, NULL);
			else
				yyval.op = NULL;
		;
    break;}
case 21:
#line 247 "parser.y"
{
			if (yyvsp[-3].op)
				yyval.op = geniCodeCall(yyvsp[-3].op, yyvsp[-1].op);
			else
				yyval.op = NULL;
		;
    break;}
case 22:
#line 253 "parser.y"
{ ignoreTypedefType = 1; ;
    break;}
case 23:
#line 254 "parser.y"
{ 
			ignoreTypedefType = 0;
			yyvsp[0].sym = newSymbol(yyvsp[0].sym->name,NestLevel);
			if (yyvsp[-3].op)
				yyval.op = geniCodeStruct (yyvsp[-3].op, operandFromSymbol(yyvsp[0].sym));
			else
				yyval.op = NULL;
		;
    break;}
case 24:
#line 262 "parser.y"
{ ignoreTypedefType = 1; ;
    break;}
case 25:
#line 263 "parser.y"
{ 
			// PTR_OP means '->'
			ignoreTypedefType = 0;
			yyvsp[0].sym = newSymbol(yyvsp[0].sym->name,NestLevel);
			if (yyvsp[-3].op)
				yyval.op = geniCodeStruct (yyvsp[-3].op, operandFromSymbol(yyvsp[0].sym));
			else
				yyval.op = NULL;
		;
    break;}
case 26:
#line 273 "parser.y"
{
			if (yyvsp[-1].op)
				yyval.op = geniCodePostInc(yyvsp[-1].op);
			else
				yyval.op = NULL;
		;
    break;}
case 27:
#line 280 "parser.y"
{
			if (yyvsp[-1].op)
				yyval.op = geniCodePostDec(yyvsp[-1].op);
			else
				yyval.op = NULL;
		;
    break;}
case 29:
#line 292 "parser.y"
{ 
		yyvsp[-2].op->next = yyvsp[0].op;
		yyval.op = yyvsp[-2].op;
	;
    break;}
case 31:
#line 302 "parser.y"
{ 
			if (yyvsp[0].op)
				yyval.op = geniCodePreInc(yyvsp[0].op);
			else 
				yyval.op = NULL;
		;
    break;}
case 32:
#line 309 "parser.y"
{ 
			if (yyvsp[0].op)
				yyval.op = geniCodePreDec(yyvsp[0].op);
			else
				yyval.op = NULL;
		;
    break;}
case 33:
#line 316 "parser.y"
{
			if (!yyvsp[0].op)
				yyval.op = NULL;
			else
			{
				if (yyvsp[-1].yyint=='-')
					yyval.op = geniCodeUnaryMinus(yyvsp[0].op);
				else if (yyvsp[-1].yyint=='*')
					yyval.op = geniCodeDerefPtr(yyvsp[0].op, NestLevel);
				else if (yyvsp[-1].yyint=='&')
					yyval.op = geniCodeAddressOf(yyvsp[0].op);	
				else
					yyval.op = geniCodeUnary(yyvsp[0].op, yyvsp[-1].yyint);
			}
		;
    break;}
case 34:
#line 332 "parser.y"
{ 
				
		;
    break;}
case 35:
#line 336 "parser.y"
{ 
			
		;
    break;}
case 36:
#line 340 "parser.y"
{ 
			
		;
    break;}
case 37:
#line 346 "parser.y"
{ yyval.yyint = '&';;
    break;}
case 38:
#line 347 "parser.y"
{ yyval.yyint = '*';;
    break;}
case 39:
#line 348 "parser.y"
{ yyval.yyint = '+';;
    break;}
case 40:
#line 349 "parser.y"
{ yyval.yyint = '-';;
    break;}
case 41:
#line 350 "parser.y"
{ yyval.yyint = '~';;
    break;}
case 42:
#line 351 "parser.y"
{ yyval.yyint = '!';;
    break;}
case 44:
#line 357 "parser.y"
{ 
			if (yyvsp[-2].lnk && yyvsp[0].op)
				yyval.op = geniCodeCast(yyvsp[-2].lnk, yyvsp[0].op, false);
			else
				yyval.op = NULL;
		;
    break;}
case 46:
#line 368 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeMultiply(yyvsp[-2].op, yyvsp[0].op);
			else
				yyval.op = NULL;
		;
    break;}
case 47:
#line 375 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeDivision(yyvsp[-2].op, yyvsp[0].op);
			else
				yyval.op = NULL;
		;
    break;}
case 48:
#line 382 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeModulus(yyvsp[-2].op, yyvsp[0].op);
			else
				yyval.op = NULL;
		;
    break;}
case 50:
#line 393 "parser.y"
{ 
		if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeAdd(yyvsp[-2].op, yyvsp[0].op, false);
		else
			yyval.op = NULL;
   ;
    break;}
case 51:
#line 400 "parser.y"
{
		if (yyvsp[-2].op && yyvsp[0].op)
			yyval.op = geniCodeSubtract(yyvsp[-2].op, yyvsp[0].op);
		else
			yyval.op = NULL;	
	;
    break;}
case 52:
#line 409 "parser.y"
{ yyval.op = yyvsp[0].op;;
    break;}
case 53:
#line 411 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeLeftShift(yyvsp[-2].op, yyvsp[0].op);
			else
				yyval.op = NULL;
		;
    break;}
case 54:
#line 418 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeRightShift(yyvsp[-2].op, yyvsp[0].op);
			else
				yyval.op = NULL;
		;
    break;}
case 56:
#line 429 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeLogic(yyvsp[-2].op, yyvsp[0].op, '<');
			else
				yyval.op = NULL;
		;
    break;}
case 57:
#line 436 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeLogic(yyvsp[-2].op, yyvsp[0].op, '>');
			else
				yyval.op = NULL;
		;
    break;}
case 58:
#line 443 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeLogic(yyvsp[-2].op, yyvsp[0].op, LE_OP);
			else
				yyval.op = NULL;
		;
    break;}
case 59:
#line 450 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeLogic(yyvsp[-2].op, yyvsp[0].op, GE_OP);
			else
				yyval.op = NULL;
		;
    break;}
case 61:
#line 461 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeLogic(yyvsp[-2].op, yyvsp[0].op, EQ_OP);
			else
				yyval.op = NULL;
		;
    break;}
case 62:
#line 468 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeLogic(yyvsp[-2].op, yyvsp[0].op, NE_OP);
			else
				yyval.op = NULL;
		;
    break;}
case 64:
#line 479 "parser.y"
{ 
			if (yyvsp[-2].op && yyvsp[0].op)
				yyval.op = geniCodeBitwise(yyvsp[-2].op, yyvsp[0].op, '&');
			else
				yyval.op = NULL;
		;
    break;}
case 66:
#line 490 "parser.y"
{ 
		if (yyvsp[-2].op && yyvsp[0].op)
			yyval.op = geniCodeBitwise(yyvsp[-2].op, yyvsp[0].op, '^');
		else
			yyval.op = NULL;
	;
    break;}
case 68:
#line 501 "parser.y"
{ 
		if (yyvsp[-2].op && yyvsp[0].op)
			yyval.op = geniCodeBitwise(yyvsp[-2].op, yyvsp[0].op, '|');
		else
			yyval.op = NULL;
	;
    break;}
case 69:
#line 511 "parser.y"
{
		yyval.op = yyvsp[0].op;
		STACK_PUSH(AndOrStack, 0);
   ;
    break;}
case 70:
#line 516 "parser.y"
{
			if( yyvsp[-1].op )
				createLogicalAnd(yyvsp[-1].op, STACK_ITEM(AndOrStack,0) = tf_label());
		;
    break;}
case 71:
#line 521 "parser.y"
{ 
			if (yyvsp[0].op)
				createLogicalAnd( yyvsp[0].op, STACK_ITEM(AndOrStack,0) );
			yyval.op = NULL;
		;
    break;}
case 72:
#line 530 "parser.y"
{
		int label;
		if( label = STACK_POP(AndOrStack))
		{
			sprintf(labelbuffer, "%s%d", L_TRUE, label);
			geniCodeGotoFromName(labelbuffer);
			yyval.op = gen_false_true(label, NULL);
		}
		else
			yyval.op = yyvsp[0].op;
	;
    break;}
case 73:
#line 544 "parser.y"
{
		yyval.op = yyvsp[0].op;
		STACK_PUSH(AndOrStack, 0);
   ;
    break;}
case 74:
#line 549 "parser.y"
{
		if( yyvsp[-1].op )
			createLogicalOr(yyvsp[-1].op, STACK_ITEM(AndOrStack,0) = tf_label());
	;
    break;}
case 75:
#line 554 "parser.y"
{ 
		if (yyvsp[0].op)
			createLogicalOr(yyvsp[0].op, STACK_ITEM(AndOrStack,0));
		yyval.op = NULL;
	;
    break;}
case 76:
#line 563 "parser.y"
{
		int label;
		if(label = STACK_POP(AndOrStack))
		{
			yyval.op = gen_false_true(label, NULL);
		}
		else
			yyval.op = yyvsp[0].op;
	;
    break;}
case 78:
#line 577 "parser.y"
{ 
		static int label = 0;
		struct symbol *_falseLab;
		seqPointNo++;
		sprintf(labelbuffer, "%s%d", L_COND_FALSE, yyval.yyint = ++label);
		_falseLab = newSymbol(labelbuffer, NestLevel);
		if (yyvsp[-1].op)
			geniCodeIfx(yyvsp[-1].op, NULL, _falseLab); 
	;
    break;}
case 79:
#line 587 "parser.y"
{
		struct operand *op = yyvsp[-1].op;
		if (!IS_ITEMP(yyvsp[-1].op))
		{
			op = newiTempOperand(operandType(yyvsp[-1].op), FALSE);
			geniCodeAssign(op, yyvsp[-1].op);
		}
		yyval.op = op;
		sprintf(labelbuffer, "%s%d", L_COND_END,  yyvsp[-2].yyint);
		geniCodeGotoFromName(labelbuffer);
		sprintf(labelbuffer, "%s%d", L_COND_FALSE,  yyvsp[-2].yyint);
		geniCodeLabelFromName(labelbuffer);
	;
    break;}
case 80:
#line 601 "parser.y"
{ 
		yyval.op = yyvsp[-1].op;
		geniCodeAssign(yyval.op, yyvsp[0].op);
		sprintf(labelbuffer, "%s%d", L_COND_END,  yyvsp[-4].yyint);
		geniCodeLabelFromName(labelbuffer);
	;
    break;}
case 82:
#line 612 "parser.y"
{
		if (!yyvsp[-2].op || !yyvsp[0].op)
			yyval.op = NULL;
		else
		{
			operand *op;
			switch (yyvsp[-1].yyint) 
			{
				case '=':
					yyval.op = geniCodeAssign(yyvsp[-2].op, yyvsp[0].op);
					break;
				case MUL_ASSIGN:
					op = geniCodeMultiply(yyvsp[-2].op, yyvsp[0].op);
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case DIV_ASSIGN:
					op = geniCodeDivision(yyvsp[-2].op, yyvsp[0].op);
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case MOD_ASSIGN:
					op = geniCodeModulus(yyvsp[-2].op, yyvsp[0].op);
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case ADD_ASSIGN:
					op = geniCodeAdd(yyvsp[-2].op, yyvsp[0].op);
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case SUB_ASSIGN:
					op = geniCodeSubtract(yyvsp[-2].op, yyvsp[0].op);
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case LEFT_ASSIGN:
					op = geniCodeLeftShift(yyvsp[-2].op, yyvsp[0].op);
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case RIGHT_ASSIGN:
					op = geniCodeRightShift(yyvsp[-2].op, yyvsp[0].op);
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case AND_ASSIGN:
					op = geniCodeBitwise(yyvsp[-2].op, yyvsp[0].op, '&');
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case XOR_ASSIGN:
					op = geniCodeBitwise(yyvsp[-2].op, yyvsp[0].op, '^');
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				case OR_ASSIGN:
					op = geniCodeBitwise(yyvsp[-2].op, yyvsp[0].op, '|');
					yyval.op = geniCodeAssign(yyvsp[-2].op, op);
					break;
				default :
					yyval.op = NULL;
			}
		}
	;
    break;}
case 83:
#line 671 "parser.y"
{ yyval.yyint = '='; ;
    break;}
case 95:
#line 687 "parser.y"
{ 
		;
    break;}
case 97:
#line 697 "parser.y"
{
         if (uselessDecl)
           yylexerror("useless declaration (possible use of keyword as variable name)");      
           
         uselessDecl = TRUE;
         yyval.sym = NULL;	  
	  ;
    break;}
case 98:
#line 705 "parser.y"
{
         /* add the specifier list to the id */
         symbol *sym , *sym1;

         for (sym1 = sym = reverseSyms(yyvsp[-1].sym);sym != NULL;sym = sym->next) {
             sym_link *lnk = copyLinkChain(yyvsp[-2].lnk);
             addDecl (sym,0,lnk) ;             
         }

         uselessDecl = TRUE;
         yyval.sym = sym1 ;
	  ;
    break;}
case 101:
#line 725 "parser.y"
{ 
     if ( !IS_SPEC(yyvsp[0].lnk)) 
	 {
       sym_link *lnk = yyvsp[0].lnk ;
       while (lnk && !IS_SPEC(lnk->next))
         lnk = lnk->next;
       lnk->next = mergeSpec(yyvsp[-1].lnk,lnk->next, "storage_class_specifier declaration_specifiers - skipped");
       yyval.lnk = yyvsp[0].lnk ;
     }
     else
       yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk, "storage_class_specifier declaration_specifiers");   
   ;
    break;}
case 103:
#line 739 "parser.y"
{ 
		if ( !IS_SPEC(yyvsp[0].lnk)) 
		{
			sym_link *lnk = yyvsp[0].lnk ;
			while (lnk && !IS_SPEC(lnk->next))
				lnk = lnk->next;
			lnk->next = mergeSpec(yyvsp[-1].lnk,lnk->next, "type_specifier declaration_specifiers - skipped");
			yyval.lnk = yyvsp[0].lnk ;
		}
		else
			yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk, "type_specifier declaration_specifiers");   
   ;
    break;}
case 105:
#line 752 "parser.y"
{ 
     if ( !IS_SPEC(yyvsp[0].lnk)) {
       sym_link *lnk = yyvsp[0].lnk ;
       while (lnk && !IS_SPEC(lnk->next))
         lnk = lnk->next;
       lnk->next = mergeSpec(yyvsp[-1].lnk,lnk->next, "function_specifier declaration_specifiers - skipped");
       yyval.lnk = yyvsp[0].lnk ;
     }
     else
       yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk, "function_specifier declaration_specifiers");   
   ;
    break;}
case 107:
#line 768 "parser.y"
{ 
			yyvsp[0].sym->next = yyvsp[-2].sym ; 
			yyval.sym = yyvsp[0].sym;		
		;
    break;}
case 108:
#line 776 "parser.y"
{ 
			 yyval.sym = yyvsp[0].sym;		
		;
    break;}
case 109:
#line 780 "parser.y"
{		
			//int a[] = {};
			yyval.sym = yyvsp[-2].sym;
			if (yyvsp[0].op)
				geniCodeAssign(operandFromSymbol(yyvsp[-2].sym), yyvsp[0].op);
		;
    break;}
case 110:
#line 790 "parser.y"
{
                  yyval.lnk = newLink (SPECIFIER) ;
                  SPEC_TYPEDEF(yyval.lnk) = 1 ;   
				;
    break;}
case 111:
#line 794 "parser.y"
{
                  yyval.lnk = newLink (SPECIFIER) ;
                  SPEC_EXTR(yyval.lnk) = 1 ;   
				;
    break;}
case 112:
#line 798 "parser.y"
{
                  yyval.lnk = newLink (SPECIFIER);
                  SPEC_STAT(yyval.lnk) = 1 ;   
				;
    break;}
case 113:
#line 802 "parser.y"
{
                  yyval.lnk = newLink (SPECIFIER) ;
                  SPEC_SCLS(yyval.lnk) = S_AUTO  ;   
				;
    break;}
case 114:
#line 806 "parser.y"
{
                  yyval.lnk = newLink (SPECIFIER);
                  SPEC_SCLS(yyval.lnk) = S_REGISTER ;   
				;
    break;}
case 115:
#line 813 "parser.y"
{ ;
    break;}
case 117:
#line 819 "parser.y"
{
		;
    break;}
case 118:
#line 824 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_NOUN(yyval.lnk) = V_CHAR  ;
                  ignoreTypedefType = 1;
			   ;
    break;}
case 119:
#line 829 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_SHORT(yyval.lnk) = 1 ;
                  ignoreTypedefType = 1;
			   ;
    break;}
case 120:
#line 834 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_NOUN(yyval.lnk) = V_INT   ;
                  ignoreTypedefType = 1;   
			   ;
    break;}
case 121:
#line 839 "parser.y"
{ 
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_LONG(yyval.lnk) = 1       ;
                  ignoreTypedefType = 1;
			   ;
    break;}
case 122:
#line 844 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  yyval.lnk->select.s.b_signed = 1;
                  ignoreTypedefType = 1;   
			   ;
    break;}
case 123:
#line 849 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_USIGN(yyval.lnk) = 1      ;
                  ignoreTypedefType = 1;   
			   ;
    break;}
case 124:
#line 854 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_NOUN(yyval.lnk) = V_VOID  ;
                  ignoreTypedefType = 1;   
			   ;
    break;}
case 125:
#line 859 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_CONST(yyval.lnk) = 1;   
			   ;
    break;}
case 126:
#line 863 "parser.y"
{
                  yyval.lnk=newLink(SPECIFIER);
                  SPEC_VOLATILE(yyval.lnk) = 1 ;   
			   ;
    break;}
case 127:
#line 867 "parser.y"
{ ;
    break;}
case 128:
#line 868 "parser.y"
{
                                   uselessDecl = FALSE;
                                   yyval.lnk = yyvsp[0].lnk ;
                                   ignoreTypedefType = 1;   
								;
    break;}
case 129:
#line 873 "parser.y"
{ ;
    break;}
case 130:
#line 874 "parser.y"
{
							symbol *sym;
							sym_link   *p  ;
							sym = findSym(TypedefTab, NULL, yyvsp[0].yychar) ;
							yyval.lnk = p = copyLinkChain(sym ? sym->type : NULL);
							SPEC_TYPEDEF(getSpec(p)) = 0;
							ignoreTypedefType = 1;   
						;
    break;}
case 131:
#line 887 "parser.y"
{
           if (!yyvsp[0].sdef->type)
             {
               yyvsp[0].sdef->type = yyvsp[-1].yyint;
             }
           else
             {
               if (yyvsp[0].sdef->type != yyvsp[-1].yyint)
                 yylexerror("%s has bad tag '%s'", yyvsp[-1].yyint==STRUCT ? "struct" : "union", yyvsp[0].sdef->tag);
             }
           
           /* add new struct to struct table */
		   addSym (StructTab, yyvsp[0].sdef, yyvsp[0].sdef->tag, yyvsp[0].sdef->level, currBlockno, 0);             
        ;
    break;}
case 132:
#line 902 "parser.y"
{
           structdef *sdef ;
           symbol *sym, *dsym;

           for (sym=yyvsp[-1].sym; sym; sym=sym->next) {
             if (IS_SPEC(sym->etype) && SPEC_SCLS(sym->etype)) {             
			   ccerror(sym->fileDef, sym->lineDef, "storage class is not allowed");               
               SPEC_SCLS(sym->etype) = 0;
             }
             for (dsym=sym->next; dsym; dsym=dsym->next) {
               if (*dsym->name && strcmp(sym->name, dsym->name)==0) {
				ccerror(sym->fileDef, sym->lineDef, "%s has duplicate member '%s'",
						yyvsp[-5].yyint==STRUCT ? "struct" : "union", sym->name);
               }
             }
           }

           /* Create a structdef   */
           sdef = yyvsp[-4].sdef ;
           sdef->fields = reverseSyms(yyvsp[-1].sym) ;			/* link the fields */
           sdef->size  = compStructSize(yyvsp[-5].yyint,sdef);   /* update size of  */
           promoteAnonStructs (yyvsp[-5].yyint, sdef);

           /* Create the specifier */
           yyval.lnk = newLink (SPECIFIER) ;
           SPEC_NOUN(yyval.lnk) = V_STRUCT;
           SPEC_STRUCT(yyval.lnk)= sdef ;
        ;
    break;}
case 133:
#line 932 "parser.y"
{
			structdef *sdef;         
			symbol *sym;
			
			sym = newSymbol(yyvsp[0].sdef->tag, NestLevel);
			
			/* find structdef stag, if not exit show error */
            sdef = findSymWithBlock (StructTab,sym,currBlockno);            
            if (sdef)
            {
				yyval.lnk = newLink(SPECIFIER) ;
				SPEC_NOUN(yyval.lnk) = V_STRUCT;
				SPEC_STRUCT(yyval.lnk) = yyvsp[0].sdef;

				if (!yyvsp[0].sdef->type)
				 {
				   yyvsp[0].sdef->type = yyvsp[-1].yyint;
				 }
				else
				 {
				   if (yyvsp[0].sdef->type != yyvsp[-1].yyint)
					 yylexerror("%s has bad tag '%s'", yyvsp[-1].yyint==STRUCT ? "struct" : "union", yyvsp[0].sdef->tag);
				 }
			}
			else
			{
				yylexerror("%s '%s' is not defined", yyvsp[-1].yyint==STRUCT ? "struct" : "union", yyvsp[0].sdef->tag);			
				yyval.lnk = NULL;
			}
         ;
    break;}
case 134:
#line 965 "parser.y"
{ yyval.yyint = STRUCT ; ;
    break;}
case 135:
#line 966 "parser.y"
{ yyval.yyint = UNION  ; ;
    break;}
case 137:
#line 971 "parser.y"
{
		 yyval.sdef = newStruct(genSymName(NestLevel)) ;
		 yyval.sdef->level = NestLevel ;
	 ;
    break;}
case 138:
#line 979 "parser.y"
{
		 yyval.sdef = findSymWithBlock (StructTab,yyvsp[0].sym,currBlockno);
		 if (!yyval.sdef) {
		   yyval.sdef = newStruct(yyvsp[0].sym->name) ;
		   yyval.sdef->level = NestLevel ;
		}			
	;
    break;}
case 140:
#line 993 "parser.y"
{ 
           symbol *sym=yyvsp[0].sym;
           while (sym && sym->next) sym=sym->next;
           sym->next = yyvsp[-1].sym ;

           yyval.sym = yyvsp[0].sym;
	   ;
    break;}
case 141:
#line 1004 "parser.y"
{ 
           /* add this type to all the symbols */
           symbol *sym ;
           for ( sym = yyvsp[-1].sym ; sym != NULL ; sym = sym->next ) {
               sym_link *btype = copyLinkChain(yyvsp[-2].lnk);

               /* make the symbol one level up */
               sym->level-- ;

               pointerTypes(sym->type,btype);
               if (!sym->type) {
                   sym->type = btype;
                   sym->etype = getSpec(sym->type);
               }
               else
                 addDecl (sym,0,btype);
               /* make sure the type is complete and sane */
               checkTypeSanity(sym->etype, sym->name);
           }
           ignoreTypedefType = 0;
           yyval.sym = yyvsp[-1].sym;
	   ;
    break;}
case 143:
#line 1031 "parser.y"
{
           yyvsp[0].sym->next  = yyvsp[-2].sym ;
           yyval.sym = yyvsp[0].sym ;	   
	   ;
    break;}
case 145:
#line 1039 "parser.y"
{
							yylexerror("bit field is not accepted");
							exit(1);
						;
    break;}
case 146:
#line 1044 "parser.y"
{
							yylexerror("bit field is not accepted");
							exit(1);
						;
    break;}
case 147:
#line 1048 "parser.y"
{ yyval.sym = newSymbol ("", NestLevel) ; ;
    break;}
case 148:
#line 1052 "parser.y"
{ fprintf(pFileRule, "\n enum_specifier -> ENUM            \'{\' enumerator_list \'}\'"); ;
    break;}
case 149:
#line 1053 "parser.y"
{ fprintf(pFileRule, "\n enum_specifier ->  ENUM identifier \'{\' enumerator_list \'}\'"); ;
    break;}
case 150:
#line 1054 "parser.y"
{ fprintf(pFileRule, "\n enum_specifier ->  ENUM identifier"); ;
    break;}
case 151:
#line 1058 "parser.y"
{ ;
    break;}
case 152:
#line 1059 "parser.y"
{ ;
    break;}
case 153:
#line 1061 "parser.y"
{ ;
    break;}
case 154:
#line 1066 "parser.y"
{  ;
    break;}
case 155:
#line 1070 "parser.y"
{ ;
    break;}
case 156:
#line 1071 "parser.y"
{;
    break;}
case 157:
#line 1076 "parser.y"
{ 
			yyval.sym = yyvsp[0].sym ; 
		;
    break;}
case 158:
#line 1080 "parser.y"
{
             addDecl (yyvsp[0].sym, 0, reverseLink(yyvsp[-1].lnk));
             yyval.sym = yyvsp[0].sym ;
         ;
    break;}
case 159:
#line 1089 "parser.y"
{
			 yyval.sym = yyvsp[0].sym ; 
		;
    break;}
case 160:
#line 1093 "parser.y"
{
			 yyval.sym = yyvsp[0].sym ; 
		;
    break;}
case 161:
#line 1100 "parser.y"
{ yyval.sym = yyvsp[0].sym; ;
    break;}
case 162:
#line 1102 "parser.y"
{
             addDecl (yyvsp[0].sym,0,reverseLink(yyvsp[-1].lnk));
             yyval.sym = yyvsp[0].sym ;
         ;
    break;}
case 165:
#line 1116 "parser.y"
{
			yyval.sym = yyvsp[-1].sym;   
		;
    break;}
case 166:
#line 1120 "parser.y"
{
            sym_link   *p;

            p = newLink (DECLARATOR);
            DCL_TYPE(p) = ARRAY ;
            DCL_ELEM(p) = 0     ;
            addDecl(yyvsp[-2].sym,0,p);		
		;
    break;}
case 167:
#line 1129 "parser.y"
{
            sym_link *p;
            value *tval;
            int size;

			tval = yyvsp[-1].op->operand.valOperand;
			
			/* check operand value */
			assert(tval);
			
            /* if it is not a constant then Error  */
            p = newLink (DECLARATOR);
            DCL_TYPE(p) = ARRAY;

            if (!tval || !tval->etype || (SPEC_SCLS(tval->etype) != S_LITERAL))
              {
                yylexerror("internal error: constant are not expected");
                /* Assume a single item array to limit the cascade */
                /* of additional errors. */
                size = 1;
              }
            else
              {
                if ((size = (int) ulFromVal(tval)) < 0)
                  {
                    yylexerror("internal error: %s has negative array size %d", yyvsp[-3].sym->name, size);
                    size = 1;
                  }
              }
            DCL_ELEM(p) = size;
            addDecl(yyvsp[-3].sym, 0, p);
         ;
    break;}
case 168:
#line 1164 "parser.y"
{ currFunc = yyvsp[-1].sym; ;
    break;}
case 169:
#line 1164 "parser.y"
{ addDecl (yyvsp[-3].sym,FUNCTION,NULL) ;;
    break;}
case 170:
#line 1165 "parser.y"
{ currFunc = yyvsp[-1].sym; NestLevel++; currBlockno++;;
    break;}
case 171:
#line 1166 "parser.y"
{
             sym_link *funcType;

             addDecl (yyvsp[-4].sym,FUNCTION,NULL) ;

             funcType = yyvsp[-4].sym->type;
             DCL_FUNC_DCLED(funcType) = 0;
             
             while (funcType && !IS_FUNC(funcType))
               funcType = funcType->next;

             assert (funcType);
			 
             FUNC_HASVARARGS(funcType) = IS_VARG(yyvsp[-1].val);
             FUNC_ARGS(funcType) = reverseVal(yyvsp[-1].val);

             /* nest level was incremented to take care of the parms  */
             NestLevel-- ;
             currBlockno--;
             currFunc = yyvsp[-4].sym;
             
             yyval.sym = yyvsp[-4].sym;
         ;
    break;}
case 172:
#line 1190 "parser.y"
{ 
           yylexerror("internal error: %s -> E_OLD_STYLE", yyvsp[-3].sym->name) ;
           /* assume it returns an int */
           yyvsp[-3].sym->type = yyvsp[-3].sym->etype = newIntLink();
           yyval.sym = yyvsp[-3].sym ;
		;
    break;}
case 173:
#line 1199 "parser.y"
{ yyval.lnk = yyvsp[0].lnk; ;
    break;}
case 174:
#line 1201 "parser.y"
{
             yyval.lnk = yyvsp[-1].lnk  ;
             if (IS_SPEC(yyvsp[0].lnk)) {
                 DCL_TSPEC(yyvsp[-1].lnk) = yyvsp[0].lnk;
                 DCL_PTR_CONST(yyvsp[-1].lnk) = SPEC_CONST(yyvsp[0].lnk);
                 DCL_PTR_VOLATILE(yyvsp[-1].lnk) = SPEC_VOLATILE(yyvsp[0].lnk);
             }
             else
                 yylexerror ("internal error: pointer type is invalid");
		;
    break;}
case 175:
#line 1212 "parser.y"
{
             yyval.lnk = yyvsp[-1].lnk ;
             yyval.lnk->next = yyvsp[0].lnk ;
             DCL_TYPE(yyvsp[0].lnk) = POINTER;
         ;
    break;}
case 176:
#line 1218 "parser.y"
{
             yyval.lnk = yyvsp[-2].lnk ;
             if (IS_SPEC(yyvsp[-1].lnk)) {
                 DCL_TSPEC(yyvsp[-2].lnk) = yyvsp[-1].lnk;             
                 DCL_PTR_CONST(yyvsp[-2].lnk) = SPEC_CONST(yyvsp[-1].lnk);
                 DCL_PTR_VOLATILE(yyvsp[-2].lnk) = SPEC_VOLATILE(yyvsp[-1].lnk);
                 DCL_TYPE(yyvsp[0].lnk) = POINTER;
             }
             else
                 yylexerror ("internal error: pointer type is invalid");
             yyval.lnk->next = yyvsp[0].lnk ;
         ;
    break;}
case 177:
#line 1234 "parser.y"
{
        yyval.lnk = newLink(DECLARATOR);
        DCL_TYPE(yyval.lnk) = POINTER;
      ;
    break;}
case 178:
#line 1242 "parser.y"
{
			 yyval.lnk = yyvsp[0].lnk; 		
		;
    break;}
case 180:
#line 1250 "parser.y"
{
     if ( !IS_SPEC(yyvsp[0].lnk)) {
       sym_link *lnk = yyvsp[0].lnk ;
       while (lnk && !IS_SPEC(lnk->next))
         lnk = lnk->next;
       lnk->next = mergeSpec(yyvsp[-1].lnk,lnk->next, "type_specifier_list type_specifier skipped");
       yyval.lnk = yyvsp[0].lnk ;
     }
     else
       yyval.lnk = mergeSpec(yyvsp[-1].lnk,yyvsp[0].lnk, "type_specifier_list type_specifier");   
	   
	;
    break;}
case 182:
#line 1267 "parser.y"
{
           yyvsp[0].sym->next = yyvsp[-2].sym;
           yyval.sym = yyvsp[0].sym ;
         ;
    break;}
case 184:
#line 1276 "parser.y"
{ ;
    break;}
case 186:
#line 1282 "parser.y"
{
            yyvsp[0].val->next = yyvsp[-2].val ;
            yyval.val = yyvsp[0].val ;
         ;
    break;}
case 187:
#line 1291 "parser.y"
{
			  symbol *loop ;
			  value *args ;			  
			  symbol *func_params;
			  pointerTypes(yyvsp[0].sym->type,yyvsp[-1].lnk);
			  addDecl (yyvsp[0].sym,0,yyvsp[-1].lnk);			 			  
			  for (loop=yyvsp[0].sym;loop;loop->_isparm=1, loop->localof = currFunc,loop=loop->next);			  			  
			  addSymChain (&yyvsp[0].sym);
			  yyval.val = symbolVal(yyvsp[0].sym);
			  ignoreTypedefType = 0;   
		;
    break;}
case 188:
#line 1303 "parser.y"
{
		  yyval.val = newValue() ;
		  yyval.val->type = yyvsp[0].lnk;
		  yyval.val->etype = getSpec(yyval.val->type);
		  ignoreTypedefType = 0;	   
	   ;
    break;}
case 189:
#line 1313 "parser.y"
{
   			yyval.lnk = yyvsp[0].lnk;
			ignoreTypedefType = 0;
		;
    break;}
case 190:
#line 1318 "parser.y"
{
                 /* go to the end of the list */
                 sym_link *p;
                 pointerTypes(yyvsp[0].lnk,yyvsp[-1].lnk);
                 for ( p = yyvsp[0].lnk ; p && p->next ; p=p->next);
                 if (!p) {
                   yylexerror("syntax error '%s'", yytext);
                 } else {
                   p->next = yyvsp[-1].lnk ;
                 }
                 yyval.lnk = yyvsp[0].lnk ;
                 ignoreTypedefType = 0;
               ;
    break;}
case 191:
#line 1334 "parser.y"
{ ;
    break;}
case 192:
#line 1335 "parser.y"
{ ;
    break;}
case 193:
#line 1336 "parser.y"
{ ;
    break;}
case 194:
#line 1341 "parser.y"
{ ;
    break;}
case 195:
#line 1342 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> \'[\' \']\'"); ;
    break;}
case 196:
#line 1343 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> \'[\' constant_expr \']\'"); ;
    break;}
case 197:
#line 1344 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> abstract_declarator2 \'[\' \']\'"); ;
    break;}
case 198:
#line 1345 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> abstract_declarator2 \'[\' constant_expr \']\'"); ;
    break;}
case 199:
#line 1346 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> \'(\' \')\'"); ;
    break;}
case 200:
#line 1347 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> \'(\' parameter_type_list \')\'"); ;
    break;}
case 201:
#line 1348 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> abstract_declarator2 \'(\' \')\' "); ;
    break;}
case 202:
#line 1349 "parser.y"
{  ;
    break;}
case 203:
#line 1349 "parser.y"
{ fprintf(pFileRule, "\n abstract_declarator2 -> abstract_declarator2 \'(\' {  } parameter_type_list \')\'"); ;
    break;}
case 205:
#line 1354 "parser.y"
{;
    break;}
case 206:
#line 1355 "parser.y"
{;
    break;}
case 207:
#line 1359 "parser.y"
{;
    break;}
case 208:
#line 1360 "parser.y"
{;
    break;}
case 209:
#line 1364 "parser.y"
{ ;
    break;}
case 210:
#line 1365 "parser.y"
{ ;
    break;}
case 211:
#line 1366 "parser.y"
{ ;
    break;}
case 212:
#line 1367 "parser.y"
{ ;
    break;}
case 213:
#line 1368 "parser.y"
{ ;
    break;}
case 214:
#line 1369 "parser.y"
{ ;
    break;}
case 215:
#line 1374 "parser.y"
{;
    break;}
case 216:
#line 1376 "parser.y"
{
		if (STACK_ITEM(SwitchStack,0) && yyvsp[-1].op)
			add_case    ( STACK_ITEM(SwitchStack,0), yyvsp[-1].op, ++Case_label );
		sprintf(labelbuffer, "%s%d", L_SWITCH, Case_label);
		geniCodeLabelFromName(labelbuffer);
	;
    break;}
case 217:
#line 1383 "parser.y"
{
		if (STACK_ITEM(SwitchStack,0))
			add_default_case( STACK_ITEM(SwitchStack,0), ++Case_label );
		sprintf(labelbuffer, "%s%d", L_SWITCH, Case_label);
		geniCodeLabelFromName(labelbuffer);
   ;
    break;}
case 218:
#line 1392 "parser.y"
{ 
			STACK_PUSH(blockNum, currBlockno);
			currBlockno = ++blockNo ;
            ignoreTypedefType = 0;
		;
    break;}
case 219:
#line 1399 "parser.y"
{ currBlockno = STACK_POP(blockNum); ;
    break;}
case 220:
#line 1403 "parser.y"
{  ;
    break;}
case 221:
#line 1404 "parser.y"
{  ;
    break;}
case 222:
#line 1405 "parser.y"
{  ;
    break;}
case 223:
#line 1406 "parser.y"
{  ;
    break;}
case 224:
#line 1407 "parser.y"
{ ;
    break;}
case 225:
#line 1412 "parser.y"
{		   
		   symbol *sym;
		   /* if this is typedef declare it immediately */
		   if (yyvsp[0].sym && IS_TYPEDEF(yyvsp[0].sym->etype)) {
			 yyval.sym = NULL ;
		   }
		   else
			yyval.sym = yyvsp[0].sym ;
			
		   ignoreTypedefType = 0;
	   
    	   sym = findSym(TypedefTab, yyvsp[0].sym, yyvsp[0].sym->name);			
		   if (sym)
		   {
		      yylexerror("duplicate identifier name '%s' and typedef type '%s'", yyvsp[0].sym->name, ((symbol *)sym)->name);
		      yyval.sym = NULL;
		   }
		   else
		   {
			   addSymChain(&yyvsp[0].sym);
			   allocVariables(yyvsp[0].sym);		   
		   }
		;
    break;}
case 226:
#line 1436 "parser.y"
{
       symbol   *sym;       
	   
       /* if this is a typedef */
       if (yyvsp[0].sym && IS_TYPEDEF(yyvsp[0].sym->etype)) {
         yyval.sym = yyvsp[-1].sym;
       }
       else {
                                /* get to the end of the previous decl */
         if ( yyvsp[-1].sym ) {
           yyval.sym = sym = yyvsp[-1].sym ;
           while (sym->next)
             sym = sym->next ;
           sym->next = yyvsp[0].sym;
         }
         else
           yyval.sym = yyvsp[0].sym ;               
       }
       
       ignoreTypedefType = 0;
       
	   sym = findSym(TypedefTab, yyvsp[0].sym, yyvsp[0].sym->name);			
	   if (sym)
	   {
	      yylexerror("duplicate identifier name '%s' and typedef type '%s'", yyvsp[0].sym->name, ((symbol *)sym)->name);
	      yyval.sym = yyvsp[-1].sym;
	   }
	   else
	   {
		   addSymChain(&yyvsp[0].sym);
		   allocVariables(yyvsp[0].sym);		   
	   }
	;
    break;}
case 228:
#line 1474 "parser.y"
{ 
		
	;
    break;}
case 229:
#line 1480 "parser.y"
{ ;
    break;}
case 230:
#line 1481 "parser.y"
{ ;
    break;}
case 231:
#line 1486 "parser.y"
{
		sprintf(labelbuffer, "%s%d", L_NEXT, yyvsp[-2].yyint);
		geniCodeLabelFromName(labelbuffer);
	;
    break;}
case 232:
#line 1491 "parser.y"
{
		sprintf(labelbuffer, "%s%d", L_ELSE, yyvsp[-3].yyint);
		geniCodeGotoFromName(labelbuffer);
		
		sprintf(labelbuffer, "%s%d", L_NEXT, yyvsp[-3].yyint);
		geniCodeLabelFromName(labelbuffer);
	;
    break;}
case 233:
#line 1499 "parser.y"
{
		sprintf(labelbuffer, "%s%d", L_ELSE, yyvsp[-5].yyint);
		geniCodeLabelFromName(labelbuffer);
	;
    break;}
case 234:
#line 1504 "parser.y"
{
		if (yyvsp[-1].op)
			STACK_PUSH( SwitchStack,	new_stab(yyvsp[-1].op, ++Case_label) );
		sprintf(labelbuffer, "%s%d", L_SWITCH, Case_label);
		geniCodeGotoFromName(labelbuffer);
		STACK_PUSH(BreakStack,	   ++Case_label);
		STACK_PUSH(BreakLabelStack, L_SWITCH);
	;
    break;}
case 235:
#line 1512 "parser.y"
{
		if (STACK_ITEM(SwitchStack,0))
			gen_stab_and_free_table( STACK_POP(SwitchStack) );
		STACK_POP(BreakStack);
		STACK_POP(BreakLabelStack);
	;
    break;}
case 236:
#line 1520 "parser.y"
{   static int label = 0;
				sprintf(labelbuffer, "%s%d", L_TEST, yyval.yyint = ++label);
				geniCodeLabelFromName(labelbuffer);
			;
    break;}
case 237:
#line 1524 "parser.y"
{
				struct symbol *_falseLab;
				yyval.yyint = yyvsp[-1].yyint;
				sprintf(labelbuffer, "%s%d", L_NEXT, yyval.yyint);
				_falseLab = newSymbol(labelbuffer, NestLevel);
				if (yyvsp[0].op)
					geniCodeIfx(yyvsp[0].op, NULL, _falseLab); 		
			;
    break;}
case 238:
#line 1532 "parser.y"
{   yyval.yyint = 0;  /* no test */
				;
    break;}
case 239:
#line 1539 "parser.y"
{
		seqPointNo++;
		STACK_PUSH(ContinueStack, yyvsp[-1].yyint);
		STACK_PUSH(ContinueLabelStack, L_TEST);
		STACK_PUSH(BreakStack, yyvsp[-1].yyint);
		STACK_PUSH(BreakLabelStack, L_NEXT);
	;
    break;}
case 240:
#line 1547 "parser.y"
{
		sprintf(labelbuffer, "%s%d", L_TEST, yyvsp[-3].yyint);
		geniCodeGotoFromName(labelbuffer);
		sprintf(labelbuffer, "%s%d", L_NEXT, yyvsp[-3].yyint);
		geniCodeLabelFromName(labelbuffer);
		STACK_POP(ContinueStack);
		STACK_POP(ContinueLabelStack);
		STACK_POP(BreakStack);
		STACK_POP(BreakLabelStack);
	;
    break;}
case 241:
#line 1558 "parser.y"
{
		static int label;
		sprintf(labelbuffer, "%s%d", L_DOTOP, yyval.yyint = ++label);
		geniCodeLabelFromName(labelbuffer);
		STACK_PUSH(ContinueStack, label);
		STACK_PUSH(ContinueLabelStack, L_DOTEST);
		STACK_PUSH(BreakStack, label);
		STACK_PUSH(BreakLabelStack, L_DOEXIT);
	;
    break;}
case 242:
#line 1568 "parser.y"
{
		sprintf(labelbuffer, "%s%d", L_DOTEST, yyvsp[-2].yyint);
		geniCodeLabelFromName(labelbuffer);
	;
    break;}
case 243:
#line 1573 "parser.y"
{
		seqPointNo++;
		sprintf(labelbuffer, "%s%d", L_DOTOP, yyvsp[-7].yyint);
		geniCodeGotoFromName(labelbuffer);
		sprintf(labelbuffer, "%s%d", L_DOEXIT, yyvsp[-7].yyint);
		geniCodeLabelFromName(labelbuffer);
		sprintf(labelbuffer, "%s%d", L_NEXT, yyvsp[-2].yyint);
		geniCodeLabelFromName(labelbuffer);
		STACK_POP(ContinueStack);
		STACK_POP(ContinueLabelStack);
		STACK_POP(BreakStack);
		STACK_POP(BreakLabelStack);
	;
    break;}
case 244:
#line 1587 "parser.y"
{
		sprintf(labelbuffer, "%s%d", L_BODY, yyvsp[-1].yyint);
		geniCodeGotoFromName(labelbuffer);
		sprintf(labelbuffer, "%s%d", L_INCREMENT, yyvsp[-1].yyint);
		geniCodeLabelFromName(labelbuffer);
		STACK_PUSH(ContinueStack,	yyvsp[-1].yyint);
		STACK_PUSH(ContinueLabelStack,	L_INCREMENT );
		STACK_PUSH(BreakStack,	yyvsp[-1].yyint);
		STACK_PUSH(BreakLabelStack,	L_NEXT);
	;
    break;}
case 245:
#line 1598 "parser.y"
{
		sprintf(labelbuffer, "%s%d", L_TEST, yyvsp[-4].yyint);
		geniCodeGotoFromName(labelbuffer);
		sprintf(labelbuffer, "%s%d", L_BODY, yyvsp[-4].yyint);
		geniCodeLabelFromName(labelbuffer);
   ;
    break;}
case 246:
#line 1605 "parser.y"
{ 
		sprintf(labelbuffer, "%s%d", L_INCREMENT, yyvsp[-6].yyint);
		geniCodeGotoFromName(labelbuffer);
		sprintf(labelbuffer, "%s%d", L_NEXT, yyvsp[-6].yyint);
		geniCodeLabelFromName(labelbuffer);
		STACK_POP(ContinueStack,	yyvsp[-6].yyint);
		STACK_POP(ContinueLabelStack,	L_INCREMENT );
		STACK_POP(BreakStack,	yyvsp[-6].yyint);
		STACK_POP(BreakLabelStack,	L_NEXT);
	;
    break;}
case 247:
#line 1618 "parser.y"
{ yyval.op = NULL ; seqPointNo++; ;
    break;}
case 248:
#line 1619 "parser.y"
{ yyval.op = yyvsp[0].op ; seqPointNo++; ;
    break;}
case 249:
#line 1624 "parser.y"
{ 
		geniCodeGotoFromName(yyvsp[-1].sym);
	;
    break;}
case 250:
#line 1628 "parser.y"
{ 
		if (STACK_EMPTY(ContinueStack))
		{
			SYNTAX_ERROR;
		}
		else
		{
			sprintf(labelbuffer, "%s%d", STACK_ITEM(ContinueLabelStack, 0), STACK_ITEM(ContinueStack, 0));
			geniCodeGotoFromName(labelbuffer);
		}
	;
    break;}
case 251:
#line 1640 "parser.y"
{ 
		if (STACK_EMPTY(BreakStack))
		{
			SYNTAX_ERROR;
		}
		else
		{
			sprintf(labelbuffer, "%s%d", STACK_ITEM(BreakLabelStack, 0), STACK_ITEM(BreakStack, 0));
			geniCodeGotoFromName(labelbuffer);
		}
	;
    break;}
case 252:
#line 1652 "parser.y"
{ 
		geniCodeReturn(NULL);
	;
    break;}
case 253:
#line 1656 "parser.y"
{
		if (yyvsp[-1].op)
			geniCodeReturn(yyvsp[-1].op);
   ;
    break;}
case 254:
#line 1664 "parser.y"
{ 
			yyval.sym = newSymbol(yyvsp[0].yychar, NestLevel);
		;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 543 "/usr/local/share/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;

 yyacceptlab:
  /* YYACCEPT comes here.  */
  if (yyfree_stacks)
    {
      free (yyss);
      free (yyvs);
#ifdef YYLSP_NEEDED
      free (yyls);
#endif
    }
  return 0;

 yyabortlab:
  /* YYABORT comes here.  */
  if (yyfree_stacks)
    {
      free (yyss);
      free (yyvs);
#ifdef YYLSP_NEEDED
      free (yyls);
#endif
    }
  return 1;
}
#line 1668 "parser.y"

